<?php
	if ($db = new SQLiteDatabase('InstantInput.db')) {
		
		$statement = "SELECT * FROM %s";	
		
		$result = $db->query("SELECT name FROM sqlite_master WHERE type='table'");
		while ($result->valid()) {
			$row = $result->current();
			$tablename = $row['name'];
			print "Entries for table: ".$tablename.'<br/>';
			$replaced = sprintf($statement, $tablename);
			$tablerows = $db->query($replaced);
			while ($tablerows->valid()) {
				$curentry = $tablerows->current();
				foreach ($curentry as $key => $value) {
					if (gettype($key) != "integer") {
						print $key.': '.$value.' ';
					}
				}
				print '<br/>';
				$tablerows->next();
			}
			$result->next();
		}
	}
		
?>